package com.bub.pay.core.dao;


import com.bub.pay.core.base.BaseDao;
import com.bub.pay.core.entity.domain.SysUser;
import com.bub.pay.core.entity.dto.merchant.MerchantUserDTO;
import com.bub.pay.core.entity.dto.user.SysUserDTO;
import com.bub.pay.core.entity.dto.merchant.MerUserDTO;
import com.bub.pay.core.entity.vo.merchant.MerchantEmployeeVo;
import com.bub.pay.core.entity.vo.user.SysUserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 *
 * <br>
 * <b>功能：</b>SysUserDao<br>
 *
 * @author Leo
 * @version 1.0
 * @date ${date}
 */
public interface SysUserDao extends BaseDao<SysUser> {

    /**
     * 商户端 , 查询员工
     *
     * @param user
     * @return
     */
    List<MerUserDTO> selectMerUserPage(SysUser user);

    /**
     * 重置谷歌验证码相关
     *
     * @param id 用户ID
     * @return 更新行数
     */
    int restGoogleSecret(Long id);

    /**
     * @param userName
     * @return
     */
    Set<String> getAccessByUserName(String userName);

    List<SysUserDTO> pageSelectUser(SysUserVo vo);

    /**
     * 重置支付密码
     * @param id id
     * @return 更新行数
     */
    int restPayPassword(@Param("id") Long id);

    /**
     * 商户后台员工查询
     * @param merchantEmployee
     * @return
     */
    List<MerchantUserDTO> selectMerchantEmployee(MerchantEmployeeVo merchantEmployee);

    /**
     * 更新商户后台员工状态(可用或不可用)
     * @param merchantEmployeeVo
     * @return
     */
    int updateMerchantEmployeeStatus(MerchantEmployeeVo merchantEmployeeVo);

    /**
     * 删除商户后台指定员工
     * @param merchantEmployeeVo
     * @return
     */
    int deleteMerchantEmployee(MerchantEmployeeVo merchantEmployeeVo);


    /**
     * 修改商户后台员工信息(姓名 邮箱 状态)
     * @param merchantEmployeeVo
     * @return
     */
    int updateMerchantEmployeeInfo(MerchantEmployeeVo merchantEmployeeVo);

    Integer selectRoleIdByRoleName(@Param("roleName") String roleName);

    int updateEmployeeRole(@Param("roleId") int roleId , @Param("userId") int userId);



}
